<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.freedesktop.UDisks2.Filesystem: UDisks Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="UDisks Reference Manual">
<link rel="up" href="ch02.html" title="D-Bus Interfaces">
<link rel="prev" href="gdbus-org.freedesktop.UDisks2.PartitionTable.html" title="org.freedesktop.UDisks2.PartitionTable">
<link rel="next" href="gdbus-org.freedesktop.UDisks2.Swapspace.html" title="org.freedesktop.UDisks2.Swapspace">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Filesystem.description" class="shortcut">Description</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Filesystem.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdbus-org.freedesktop.UDisks2.PartitionTable.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdbus-org.freedesktop.UDisks2.Swapspace.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdbus-org.freedesktop.UDisks2.Filesystem"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdbus-interface-org-freedesktop-UDisks2-Filesystem.top_of_page"></a>org.freedesktop.UDisks2.Filesystem</span></h2>
<p>org.freedesktop.UDisks2.Filesystem — Block device containing a mountable filesystem</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Methods</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.SetLabel" title="The SetLabel() method">SetLabel</a>      (IN  s     label,
               IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount" title="The Mount() method">Mount</a>         (IN  a{sv} options,
               OUT s     mount_path);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount</a>       (IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Resize" title="The Resize() method">Resize</a>        (IN  t     size,
               IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Check" title="The Check() method">Check</a>         (IN  a{sv} options,
               OUT b     consistent);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Repair" title="The Repair() method">Repair</a>        (IN  a{sv} options,
               OUT b     repaired);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.TakeOwnership" title="The TakeOwnership() method">TakeOwnership</a> (IN  a{sv} options);
</pre>
</div>
<div class="refsect1">
<a name="id-1.3.3.9.4"></a><h2>Properties</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-property-org-freedesktop-UDisks2-Filesystem.MountPoints" title='The "MountPoints" property'>MountPoints</a>  readable   aay
<a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-property-org-freedesktop-UDisks2-Filesystem.Size" title='The "Size" property'>Size</a>         readable   t
</pre>
</div>
<div class="refsect1">
<a name="gdbus-interface-org-freedesktop-UDisks2-Filesystem"></a><h2>Description</h2>
<p>      This interface is used for <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a>
      devices that contain a mountable filesystem.
</p>
</div>
<div class="refsect1">
<a name="gdbus-methods-org.freedesktop.UDisks2.Filesystem"></a><h2>Method Details</h2>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.SetLabel"></a><h3>The SetLabel() method</h3>
<pre class="programlisting">
SetLabel (IN  s     label,
          IN  a{sv} options);
</pre>
<p>        Sets the filesystem label.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>label</code></em></code>:</span></p></td>
<td><p>The label to set.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount"></a><h3>The Mount() method</h3>
<pre class="programlisting">
Mount (IN  a{sv} options,
       OUT s     mount_path);
</pre>
<p>        Mounts the filesystem.
</p>
<p>        The directory the filesystem will be mounted in is determined
        by looking at data related to the device or filesystem (such
        the filesystem UUID and label) and will be created
        automatically except if the device the filesystem resides on
        is referenced in the <code class="filename">/etc/fstab</code> file, see
        below. In either case, the directory the filesystem is mounted
        in, is returned in <em class="parameter"><code>mount_path</code></em> on success - it is usually a
        sub-directory of <code class="filename">/run/media/$USER</code> but note that
        any directory may be returned.
</p>
<p>        The filesystem type to use can be overridden with the <em class="parameter"><code>fstype</code></em>
        option and mount options (a comma-separated string) can be
        given in <em class="parameter"><code>options</code></em> option. Note that both the mount options and
        filesystem types are validated against a (small) whitelist to
        avoid unexpected privilege escalation
</p>
<p>        If the device in question is referenced in the
        <code class="filename">/etc/fstab</code> file, the
        <span class="command"><strong>mount</strong></span> command is called directly (as root)
        and the given options or filesystem type given in <em class="parameter"><code>options</code></em> are
        ignored.
</p>
<p>        If <code class="literal">x-udisks-auth</code> is specified as an option
        for the device in the <code class="filename">/etc/fstab</code> file,
        then the <span class="command"><strong>mount</strong></span> command is run as the
        calling user, without performing any authorization check
        mentioned above. If this fails because of insufficient
        permissions, an authorization check is performed (which
        typically results in the user having to authenticate as an
        administrator). If authorized, the <span class="command"><strong>mount</strong></span>
        command is then run as root.
</p>
<p>        The filesystem should be unmounted using the
        <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount()</a> method.
</p>
<p>        If the device is removed without being unmounted (e.g. the
        user yanking the device or pulling the media out) or unmounted
        in a way that bypasses the
        <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount" title="The Unmount() method">Unmount()</a> method
        (e.g. unmounted by the super-user by using the
        <span class="citerefentry"><span class="refentrytitle">umount</span>(8)</span>
        command directly), the device will be unmounted (if needed)
        and/or the mount point will be cleaned up.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>fstype</code></em> (of type 's') and <em class="parameter"><code>options</code></em> (of type 's').</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">OUT s <em class="parameter"><code>mount_path</code></em></code>:</span></p></td>
<td><p>The filesystem path where the device was mounted.</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Unmount"></a><h3>The Unmount() method</h3>
<pre class="programlisting">
Unmount (IN  a{sv} options);
</pre>
<p>        Unmount a mounted device.
</p>
<p>        If the device in question was mounted by the calling user
        via the <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-method-org-freedesktop-UDisks2-Filesystem.Mount" title="The Mount() method">Mount()</a> method the
        filesystem is unmounted without any authorization checks.
        Otherwise, an authorization check is performed (which
        typically results in the user having to authenticate as an
        administrator). If authorized, the filesystem is unmounted.
</p>
<p>        If the mountpoint was previously created by udisks it is
        guaranteed it will be removed upon returning from this method
        call.
</p>
<p>        If the filesystem is busy, this operation fails with the error
        <a class="link" href="udisks2-UDisksError.html#UDISKS-ERROR-DEVICE-BUSY:CAPS"><code class="constant">org.freedesktop.UDisks2.Error.DeviceBusy</code></a>
        unless the <em class="parameter"><code>force</code></em> option is used.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>force</code></em> (of type 'b').</p></td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Resize"></a><h3>The Resize() method</h3>
<pre class="programlisting">
Resize (IN  t     size,
        IN  a{sv} options);
</pre>
<p>        Resizes the filesystem.
</p>
<p>        Shrinking operations need to move data which causes this action to be
        slow. The filesystem-resize job for the object might expose progress.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN t <em class="parameter"><code>size</code></em></code>:</span></p></td>
<td><p>The target size in bytes, 0 for maximum.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.7.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Check"></a><h3>The Check() method</h3>
<pre class="programlisting">
Check (IN  a{sv} options,
       OUT b     consistent);
</pre>
<p>         Checks the filesystem for consistency.
</p>
<p>         Unsupported filesystems result in an error.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">OUT b <em class="parameter"><code>consistent</code></em></code>:</span></p></td>
<td><p>Whether the filesystem is undamaged.</p></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.7.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.Repair"></a><h3>The Repair() method</h3>
<pre class="programlisting">
Repair (IN  a{sv} options,
        OUT b     repaired);
</pre>
<p>         Tries to repair the filesystem.
</p>
<p>         Unsupported filesystems result in an error.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">OUT b <em class="parameter"><code>repaired</code></em></code>:</span></p></td>
<td><p>Whether the filesystem could be successfully repaired.</p></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.7.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Filesystem.TakeOwnership"></a><h3>The TakeOwnership() method</h3>
<pre class="programlisting">
TakeOwnership (IN  a{sv} options);
</pre>
<p>         Changes ownership of the filesystem to the UID and GID of the calling
         user.
</p>
<p>         Filesystems that don't support ownership result in an error.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>recursive</code></em> (of type 'b').</p></td>
</tr></tbody>
</table></div>
<p class="since">Since 2.7.2</p>
</div>
</div>
<div class="refsect1">
<a name="gdbus-properties-org.freedesktop.UDisks2.Filesystem"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Filesystem.MountPoints"></a><h3>The "MountPoints" property</h3>
<pre class="programlisting">
MountPoints  readable   aay
</pre>
<p>         An array of filesystems paths for where the file system on
         the device is mounted. If the device is not mounted, this
         array is empty.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Filesystem.Size"></a><h3>The "Size" property</h3>
<pre class="programlisting">
Size  readable   t
</pre>
<p>The size of the filesystem.  This is the amount of</p>
<p>         bytes used on the block device.  If this is smaller than
         org.freedesktop.Udisks2.Block.Size, then the filesystem can
         be made larger with Resize.
</p>
<p>         If the size is unknown, the property is zero.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>